<md-dialog aria-label="Mango (Fruit)">
    <md-dialog-content>


        <md-toolbar>
            <div class="md-toolbar-tools">
                <h2>Mango (Fruit)</h2>
                <span flex></span>
                <md-button class="md-icon-button" ng-click="close()">
                    <md-icon aria-label="Close dialog"></md-icon>
                </md-button>
            </div>
        </md-toolbar>





        <md-card>
            <md-card-title>
                <md-card-title-text>
                    <span class="md-headline">Add var</span>
                    <span class="md-subhead">(no space)</span>
                </md-card-title-text>
            </md-card-title>

            <md-card-content>
                <div layout="row">
                    <md-input-container>
                        <label>Name</label>
                        <input ng-model="v.name" required type="text" minlength="1" maxlength="100" ng-pattern="/^[a-zA-Z0-9_.-]*$/">
                    </md-input-container>

                    <md-input-container>
                        <label>Value</label>
                        <input  ng-model="v.value" required type="text">
                    </md-input-container>

                    <md-input-container>

                        <label>Type</label>

                        <md-select ng-model="v.type">
                            <md-option value="text">Text</md-option>
                            <md-option value="int">Int</md-option>
                            <md-option value="date">Date</md-option>
                            <md-option value="code">Code</md-option>
                        </md-select>

                    </md-input-container>
                </div>
            </md-card-content>
        </md-card>




    </md-dialog-content>

    <md-dialog-actions layout="row">
        <span flex></span>
        <md-button ng-click="close()">
            Close
        </md-button>
        <md-button ng-if="!v.name.$error && !v.value.error && v.type" ng-click="add(v)">
            Add
        </md-button>
    </md-dialog-actions>
    </form>
</md-dialog>